<template>
	<view>
		<view class="" v-for="(item,index) in list" :key="index">
			<image class="car" src="https://x.bilinmeiju.com/static/carbj.png" mode=""></image>
			<view class="cars">
				<view class="cars-1">
					{{item.carnumber}}
				</view>
				<view class="cars-2">
					<image class="cars-2img" :src="item.owner.headimgurl" mode=""></image>
					<view class="cars-2text">
						{{item.owner.personName}}|{{item.carno}}
					</view>
				</view>
			</view>
		</view>

		<view class="bottom" @click="$gopage('/pages/center/mycar/add')">
			添加车辆
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],

			}
		},
		onShow() {
			this.getlist()
		},
		methods: {
			getlist() {
				this.$post('center/getmycar', {}).then(res => {
					this.list = res.data.list
				})
			}
		}
	}
</script>

<style>
	.car {
		width: 712rpx;
		height: 227rpx;
		margin: 0rpx 19rpx;
		margin-top: 40rpx;
	}

	.cars {
		width: 90vw;
		margin: 0rpx auto;
		margin-top: -200rpx;
	}

	.cars-1 {
		font-size: 36rpx;
		font-family: Alibaba PuHuiTi;
		font-weight: 400;
		color: #FFFFFF;
		margin-bottom: 80rpx;
	}

	.cars-2 {
		display: flex;
		align-items: center;
	}

	.cars-2img {
		width: 52rpx;
		height: 52rpx;
	}

	.cars-2text {
		margin-left: 20rpx;
		font-size: 34rpx;
		font-family: Alibaba PuHuiTi;
		font-weight: 400;
		color: #FFFFFF;
	}

	.bottom {

		width: 700rpx;
		height: 100rpx;
		margin: 0 auto;
		margin-top: 100rpx;
		background-image: url('https://x.bilinmeiju.com/static/caran.png');
		background-size: 700rpx auto;
		line-height: 100rpx;
		color: white;
		font-size: 36rpx;
		font-weight: 600;
		text-align: center;
	}
</style>
